package com.gitee.neuray.security.admin.api;

import com.gitee.neuray.security.admin.dto.AdminOrgDto;
import com.gitee.neuray.security.admin.dto.AdminRoleDto;
import com.gitee.neuray.security.admin.dto.StaffDto;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

public interface AdminStaffApi {
    /**
     * 根据部门id获取部门下所有人员
     * @param
     * @return
     */
    @GetMapping(value = "findStaffByOrgId")
    @ResponseBody
    List<StaffDto> findStaffByOrgId(@RequestParam String id);

    /**
     * 根据人员id获取人员信息
     * @param id
     * @return
     */
    @GetMapping(value = "findStaffById")
    @ResponseBody
    StaffDto findStaffById(@RequestParam String id);

    /**
     * 根据部门id获取部门信息
     * @param id
     * @return
     */
    @GetMapping(value = "findOrgById")
    @ResponseBody
    AdminOrgDto findOrgById(@RequestParam String id);

    /**
     * 根据部门名获取部门信息
     * @param ORG_NAME
     * @return
     */
    @PostMapping(value = "findOrgByOrgName")
    @ResponseBody
    AdminOrgDto findOrgByOrgName(@RequestParam String ORG_NAME);

    /**
     * 根据人员名获取人员信息
     * @param NAME
     * @return
     */
    @PostMapping(value = "findStaffByName")
    @ResponseBody
    StaffDto findStaffByName(@RequestParam String NAME);

    @GetMapping(value = "findRoleByUserId")
    @ResponseBody
    List<Map> findRoleByUserId(@RequestParam String id);
}
